package com.learn.controller;

import com.learn.entities.Order;
import com.learn.resp.Result;
import com.learn.service.OrderService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/08/09
 * @description
 */
@RestController
public class OrderController {
    @Resource
    private OrderService orderService;

    @PostMapping("/order/create")
    public Result<String> create(@RequestBody Order order) {
        orderService.create(order);
        return Result.success("成功创建订单");
    }
}
